
#ifndef __TCS_CONFIG_H__
#define __TCS_CONFIG_H__

#define CMD_DEFAULT_ALLOC_SIZE 8192
#define MAX_CMD_AUTH_SIZE 108

#define PAGE64K 0x10000	

#define TPCM_TRANS_BUFFER_LIMIT 		0x200000

#define TPCM_COMMAND_BUFFER_SIZE		4096
#define TPCM_POLICY_UPDATE_CMD_LIMIT	(TPCM_COMMAND_BUFFER_SIZE-256)
#define TPCM_RESPONSE_BUFFER_SIZE		TPCM_COMMAND_BUFFER_SIZE

/** 启动度量限制 */
#define TPCM_BMEASURE_REFERENCE_CMD_LIMIT		0X4000	/** 16KB */
#define TPCM_BMEASURE_REFERENCE_UPDATE_LIMIT	(TPCM_BMEASURE_REFERENCE_CMD_LIMIT-256)
#define TPCM_BMEASURE_REFERENCE_READ_LIMIT		TPCM_BMEASURE_REFERENCE_CMD_LIMIT
#define TPCM_BMEASURE_RECORD_READ_LIMIT			TPCM_BMEASURE_REFERENCE_CMD_LIMIT

/** 文件完整性限制 */
#define TPCM_FILE_INTEGRITY_UPDATE_COMMAND_LIMIT	(TPCM_TRANS_BUFFER_LIMIT-256)

/** SM硬算法限制 */
#define TPCM_SM2_SIGN_LIMIT		0x8000000	/** 128MB */	
#define TPCM_SM3_LIMIT			0xA000000	/** 160MB */	
#define TPCM_SM4_ECB_LIMIT		0x8000000	/** 128MB */

#define NV_READ_INDEX_BLOCK     1017
#endif /** __TCS_CONFIG_H__ */

